do not display encrypt action for external folders
authorJyrki Gadinger <nilsding@nilsding.org>
Tue, 25 Feb 2025 08:39:33 +0000 (09:39 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 25 Feb 2025 10:45:41 +0000 (10:45 +0000)
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
src/gui/accountsettings.cpp

index 98517452f5f2c891bee23884d25b5f2bd923a8e6..5d352bdbab8287d5a383376efa2826ead8036986 100644 (file)
@@ -601,8 +601,9 @@ void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index
         const auto isEncrypted = info->isEncrypted();
         const auto isParentEncrypted = _model->isAnyAncestorEncrypted(index);
         const auto isTopFolder = index.parent().isValid() && !index.parent().parent().isValid();
+        const auto isExternal = info->_isExternal;
 
-        if (!isEncrypted && !isParentEncrypted && isTopFolder) {
+        if (!isEncrypted && !isParentEncrypted && !isExternal && isTopFolder) {
             ac = menu.addAction(tr("Encrypt"));
             connect(ac, &QAction::triggered, [this, info] { slotMarkSubfolderEncrypted(info); });
         } else {